//
//  UWApi.h
//  Urban Words
//
//  Created by Tim Brandin on 2011-11-25.
//  Copyright (c) 2011 Sypreme. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "JSON.h"
#import "UWRequest.h"

/**
 * UWApi, version 1.2 (iOS)
 * A RESTful API
 */
@interface UWApi : NSObject

// Create:




// Read: (Deprecated)
+ (void)call:(NSString *)method delegate:(id)delegate;
+ (void)call:(NSString *)method withParams:(NSDictionary *)params 
    delegate:(id)delegate;
+ (void)read:(NSString *)method delegate:(id)delegate;
+ (void)read:(NSString *)method withParams:(NSDictionary *)params 
    delegate:(id)delegate;
+ (void)define:(NSString *)word delegate:(id)delegate;



// Read:
+ (void)read:(NSString *)method listener:(id)object action:(SEL)selector;
+ (void)read:(NSString *)method withParams:(NSDictionary *)params 
    listener:(id)object action:(SEL)selector;
+ (void)define:(NSString *)word listener:(id)object action:(SEL)selector;



// Update (Deprecated):
+ (void)update:(NSString *)method withData:(NSDictionary *)data 
      delegate:(id)delegate;
+ (void)update:(NSString *)method withData:(NSDictionary *)data 
    withParams:(NSDictionary *)params delegate:(id)delegate;



// Update:
+ (void)update:(NSString *)method withData:(NSDictionary *)data 
      listener:(id)object action:(SEL)selector;
+ (void)update:(NSString *)method withData:(NSDictionary *)data 
    withParams:(NSDictionary *)params  listener:(id)object action:(SEL)selector;



// Delete:


+ (id)parseJson:(NSData *)data;

@end
